package cate.common.table.activity.warorder.sheet;

import cate.common.table.ESheet;
import cate.common.table.activity.warorder.row.WarorderMallLevelRow;
import easy.java.dev.note.NoteClass;

@NoteClass("商城等级")
public class WarorderMallLevelSheet extends ESheet<WarorderMallLevelRow> {

    @Override
    public String getSheetName() {
        return "商城等级";
    }

    public int getLevel(long exp) {
        int level = 0;
        for (WarorderMallLevelRow row : this.getList()) {
            if (exp >= row.exp && row.level >= level) {
                level = row.level;
            }
        }
        return level;
    }

}
